Update flutter_barcode_scanner to v2.0.2: Restore Android v1 Embedding, Improve Lifecycle Stability, Add Platform Checks, Tests, and Documentation#3
Open
anan474 wants to merge 2 commits intodecodevM:masterfrom
Conversation
…r unsupported platforms
…t and improved error handling
Author
|
This PR address issue reported at FlutterFlow/flutterflow-issues#6176 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the
flutter_barcode_scannerplugin to version 2.0.2, with major improvements to platform support, Android compatibility, and error handling. The changes restore legacy Android embedding support, improve lifecycle management to prevent crashes, and ensure the plugin provides clear errors when invoked on unsupported platforms. Additionally, tests and documentation have been added to clarify platform expectations.Platform Support & Error Handling
flutter_barcode_scanner.dartto ensure plugin methods only run on Android/iOS, throwing a descriptivePlatformExceptionfor unsupported platforms and when the plugin is not registered. [1] [2] [3] [4]Android Embedding & Lifecycle
registerWithmethod inFlutterBarcodeScannerPlugin.java, using reflection to obtain the legacy registrar and dependencies. [1] [2]Compatibility & Dependency Updates
jcenter()tomavenCentral()for better compatibility.pubspec.yamlto version 2.0.2 and added missing test dependencies. [1] [2]Testing & Tooling
Documentation
CHANGELOG.mdto reflect new features, bug fixes, and platform support clarifications.